package gaobo.tree;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class TestTree {
    public static void main2(String[] args) {
        MyBinaryTree myBinaryTree = new MyBinaryTree();
        MyBinaryTree.TreeNode root = myBinaryTree.createTree();
//        myBinaryTree.preOrder(root);
//        System.out.println();
//        myBinaryTree.inOrder(root);
//        System.out.println();
//        myBinaryTree.postOrder(root);
//        System.out.println();

        //myBinaryTree.size(root);
        //System.out.println("节点个数:" + MyBinaryTree.nodeSize);
        //System.out.println("节点个数:" + myBinaryTree.size2(root));

//        System.out.println("叶子节点个数:" + myBinaryTree.getLeafNodeCount(root));
//        myBinaryTree.getLeafNodeCount2(root);
//        System.out.println("叶子节点个数:"+MyBinaryTree.leafSize);

//        System.out.println("第K层节点的个数"+myBinaryTree.getKLevelNodeCount(root,3));

//        System.out.println("层序遍历:");
//        myBinaryTree.levelOrder(root);

        System.out.println(myBinaryTree.isCompleteTree(root));
    }

    public static void main(String[] args) {
//        Scanner sc = new Scanner(System.in);
//        System.out.println("请输入先序遍历字符串:");
//        MyBinaryTree myBinaryTree = new MyBinaryTree();
//        while (sc.hasNextLine()){
//            String str = sc.nextLine();
//            MyBinaryTree.TreeNode root = myBinaryTree.createTree2(str);
//            //中序遍历这棵二叉树
//            myBinaryTree.inOrder(root);
//
//        }
//        sc.close();

//        MyBinaryTree myBinaryTree = new MyBinaryTree();
//        MyBinaryTree.TreeNode root = myBinaryTree.createTree2("abc##de#g##f###");

//        myBinaryTree.inOrder(root);

//        MyBinaryTree myBinaryTree = new MyBinaryTree();
//        MyBinaryTree.TreeNode root = myBinaryTree.createTree();
//        myBinaryTree.postOrder(root);
//        System.out.println();
//        myBinaryTree.postorderTraversalNor(root);
    }
}
